package com.ruoyi.machine.advanced.alarm.service;

import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.machine.advanced.alarm.domain.MachineAlarm;
import com.ruoyi.machine.advanced.alarm.domain.MachineAlarmCond;
import com.ruoyi.machine.advanced.alarm.mapper.MachineAlarmMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 设备警报
 * 业务逻辑层
 */
@Service
public class MachineAlarmServiceImpl implements IMachineAlarmService {
    @Autowired
    private MachineAlarmMapper machineAlarmMapper;

    /**
     * 根据搜索条件所有设备警报记录
     * @param cond 搜索条件
     * @return
     */
    @Override
    public List<MachineAlarm> selectMachineAlarmList(MachineAlarmCond cond) {
        return machineAlarmMapper.selectMachineAlarmList(cond);
    }

    /**
     * 新增设备警报记录
     * @param machineAlarm
     * @return
     */
    @Override
    public int insertMachineAlarm(MachineAlarm machineAlarm) {
        return machineAlarmMapper.insertMachineAlarm(machineAlarm);
    }
}
